package beerAir;

public class Ticket {

	private Baggage[] arrBag;
	private Flight flight;
	private String idTicket;
	private Seat seat;
	private float subTotal;
	private User user;
	private int invoiceNumber;
	private float reduction;
	private String userType;
	
	public float calcSubTotal(float seatPrice, float flightPrice, float[] baggagePrice){
		
		return subTotal = seat.getSeatPrice() + flight.getTravelPrice() + arrBag[0].getBaggagePrice() + arrBag[1].getBaggagePrice();
	}

	public Ticket() {
		super();
	}

	public float getSubTotal() {
		return subTotal;
	}

	public Baggage[] getArrBag() {
		return arrBag;
	}

	public void setArrBag(Baggage[] arrBag) {
		this.arrBag = arrBag;
	}

	public Flight getFlight() {
		return flight;
	}

	public void setFlight(Flight flight) {
		this.flight = flight;
	}

	public String getIdTicket() {
		return idTicket;
	}

	public void setIdTicket(String idTicket) {
		this.idTicket = idTicket;
	}

	public Seat getSeat() {
		return seat;
	}

	public void setSeat(Seat seat) {
		this.seat = seat;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public int getInvoiceNumber() {
		return invoiceNumber;
	}

	public void setInvoiceNumber(int invoiceNumber) {
		this.invoiceNumber = invoiceNumber;
	}

	public float getReduction() {
		return reduction;
	}

	public void setReduction(float reduction) {
		this.reduction = reduction;
	}

	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	public void setSubTotal(float subTotal) {
		this.subTotal = subTotal;
	}
	
}